﻿<!DOCTYPE html>
<html lang="zh">

<head resource>
    <meta charset="utf-8">
    <include file="../inc/meta.inc" />
    <title>找回密码</title>
</head>

<body>

    <div id="vapp" v-cloak>

        <page_header title="找回密码" icon="&#xe67b" home="true"></page_header>
        <context>
            <img :src="organ.Org_Logo" v-if="organ.Org_Logo!=''" class="logo" />
            <img src="../Images/def_logo.gif" style="height: 32px;" class="logo" v-else />
            <div v-html="organ.Org_PlatformName" class="platinfo"></div>
            <!--输入账号-->
            <card v-if="step==1">
                <card-title>
                    <icon style="font-size: 23px;">&#xe687</icon>请输录您的账号
                </card-title>
                <card-context>
                    <van-field v-model="acc.input" label="账号" required :error='acc.error' :error-message="acc.message"
                        placeholder="请输入您的账号">
                    </van-field>
                    <van-cell class="btns">
                        <template #title>
                            <van-button type="info" @click="testAcc" :loading="loading" :disabled="loading"
                                loading-text="正在执行...">
                                <icon>&#xe6c6</icon>下一步
                            </van-button>
                        </template>
                    </van-cell>
                </card-context>
            </card>
            <!--安全问题-->
            <card v-if="step==2">
                <card-title>
                    <icon>&#xa043</icon>安全问题
                </card-title>
                <card-context>
                    <van-cell title="账号" :value="account.Ac_AccName"></van-cell>
                    <template v-if="account.Ac_Qus!=''">
                        <van-cell title="安全问题" :value="account.Ac_Qus"></van-cell>
                        <van-field v-model="ques.input" label="答案" required :error='ques.error'
                            :error-message="ques.message" placeholder="">
                        </van-field>
                        <van-cell class="btns">
                            <template #title>
                                <van-button type="info" @click="testQues" :loading="loading" :disabled="loading"
                                    loading-text="正在执行...">
                                    <icon>&#xe6c6</icon>下一步
                                </van-button>
                            </template>
                        </van-cell>
                    </template>
                    <template v-else>
                        <van-cell title="提示" label="没有设置安全问题，无法找回密码，请联系管理员！"></van-cell>
                    </template>
                </card-context>
            </card>
            <!--修改密码-->
            <card v-if="step==3">
                <card-title>
                    <div class="acc_photo" v-if="!!account.Ac_Photo && account.Ac_Photo!=''"
                        :style="'background-image: url('+account.Ac_Photo+');'"></div>
                    <template v-else>
                        <div class="acc_photo woman" v-if="account.Ac_Sex==2"></div>
                        <div class="acc_photo man" v-else></div>
                    </template>
                    重新设置密码
                </card-title>
                <card-context>
                    <van-cell title="账号" :value="account.Ac_AccName"></van-cell>
                    <van-field v-model="pw.input1" label="密码" required type="password" placeholder=""> </van-field>

                    <van-field v-model="pw.input2" label="密码确认" required type="password" :error='pw.error'
                        :error-message="pw.message" placeholder="">
                    </van-field>
                    <van-cell class="btns">
                        <template #title>
                            <van-button type="info" @click="setupPw" :loading="loading" :disabled="loading"
                                loading-text="正在执行...">
                                <icon>&#xa030</icon>设置密码
                            </van-button>
                        </template>
                    </van-cell>


                </card-context>
            </card>
        </context>
    </div>


</body>

</html>